import Relay from "react-relay";

export default class SaveOrderMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { saveOrder }`;
    }

    getVariables() {
        return {
            argsInput: {
                parentId:this.props.parentId,
                createUser:this.props.createUser,
                enId:this.props.enId,
                createDate:this.props.createDate,
                account:this.props.account,
                payAccount:this.props.payAccount,
                status:this.props.status,
                orderType:this.props.orderType,
                partA:this.props.partA,
                partAName:this.props.partAName,
                partAAddress:this.props.partAAddress,
                partAUserId:this.props.partAUserId,
                partAUserName:this.props.partAUserName,
                requirement:this.props.requirement,
                rmark:this.props.rmark,
                contractId:this.props.contractId,
                traderUrl1:this.props.traderUrl1,
                traderUrl2:this.props.traderUrl2,
                traderUrl3:this.props.traderUrl3,
                traderUrl4:this.props.traderUrl4,
                traderUrl5:this.props.traderUrl5,
                contractUrl1:this.props.contractUrl1,
                contractUrl2:this.props.contractUrl2,
                contractUrl3:this.props.contractUrl3,
                contractUrl4:this.props.contractUrl4,
                contractUrl5:this.props.contractUrl5,
                goodsInfo:this.props.goodsInfo,
                deliverRequest:this.props.deliverRequest,
                makeType: this.props.makeType
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on saveOrderPayload {
            saveOrder {
                errorCode
                order{
                    oid
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on saveOrderPayload {
            saveOrder {
                errorCode
                order{
                    oid
                }
                }
             }
            `]
        }];
    }

}